﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace com.sharepointutils.application2007
{
    public class SP07ClientContext
    {
        public String Username { get; set; }
        public String Password { get; set; }
        public String Domain { get; set; }
        public String URL { get; set; }

        public SP07ClientContext (String url, String domain, String username,String password)
        {
            URL = url;
            Password = password;
            Domain = domain;
            Username = username;
        }

        public SP07ClientContext(String url)
        {
            URL = url;
        }

        private Queue<SP07Base> Requests = new Queue<SP07Base>();

        public void Load(SP07Base request)
        {
            Requests.Enqueue(request);
        }

        public void Execute()
        {
            while(Requests.Count != 0)
            {
                var r = Requests.Dequeue();
                r.Load();
            }
        }
    }
}
